package com.example.eshop_ssm.service.impl;

import com.example.eshop_ssm.entity.TbAdminUserInfo;
import com.example.eshop_ssm.mapper.LoginAndOutMapper;
import com.example.eshop_ssm.service.LoginAndOutService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;

@Service
public class LoginAndOutServiceImpl implements LoginAndOutService {
    @Autowired
    private LoginAndOutMapper loginAndOutMapper;
    @Override
    public TbAdminUserInfo loginVerification(String userName, String userPwd, String code) {
        HashMap<String, Object> userMap = new HashMap<>();
        userMap.put("userName",userName);
        userMap.put("userPwd",userPwd);
        TbAdminUserInfo tbAdminUser = loginAndOutMapper.loginVerification(userMap);
        return tbAdminUser;
    }

    @Override
    public TbAdminUserInfo selectById(Integer id) {
        return loginAndOutMapper.selectById(id);
    }
}
